package com.chapter.sample.answer.controller;

import cn.hutool.core.util.IdUtil;
import com.chapter.sample.answer.aopreview.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootVersion;
import org.springframework.core.SpringVersion;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayAopReviewController {
    @Autowired
    private PayService payService;

    @RequestMapping("/pay/app")
    public String pay() {
        System.out.println("SpringVersion：" + SpringVersion.getVersion() + " SpringBootVersion:" + SpringBootVersion.getVersion());
        payService.pay();
        return IdUtil.simpleUUID();
    }
}
